package com.wangmei.service.serviceimpl;

import com.wangmei.mapper.TransportMapper;
import com.wangmei.model.Transport;
import com.wangmei.service.TransportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TransportServiceImpl implements TransportService {
    @Autowired
    private TransportMapper transportMapper;

    @Override
    public List<Transport> queryAll(Map map){
        return transportMapper.queryAll(map);
    }

    @Override
    public int insert(Transport transport) {
        return transportMapper.insertSelective(transport);
    }

    @Override
    public int delete(int id) {
        return transportMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(Transport transport){
        return transportMapper.updateByPrimaryKeySelective(transport);
    }
}
